var hong = document.querySelectorAll(".hong");
for (var i = 0; i < hong.length; i++) {
    hong[i].index = i;
    hong[i].onclick = function () {
        for (var i = 0; i < hong.length; i++) {
            hong[i].className = "hong";
        }
        hong[this.index].className = "hong mkl";
    }
}


var oli = document.querySelectorAll(".boder>.con>.conp>ul>li");
for (var i = 0; i < oli.length; i++) {
    oli[i].index = i;
    oli[i].onclick = function () {
        for (var i = 0; i < oli.length; i++) {
            oli[i].className = "";
        }
        oli[this.index].className = "cai";
    }
}

var ppp = document.querySelectorAll(".ppp");
var ptr = document.querySelectorAll(".boder>.bott>.coq>.ppp>i");
for (var i = 0; i < ppp.length; i++) {
    ppp[i].index = i;
    ppp[i].onclick = function () {
        for (var i = 0; i < ppp.length; i++) {
            ppp[i].className = "ppp";
            ptr[i].className = "";
        }
        ppp[this.index].className = "ppp pth";
        ptr[this.index].className = "pio";
    }
}


var big = document.querySelector(".big");
var bif = document.querySelector(".bif");
var byt1 = document.querySelector(".byt1");
var byt2 = document.querySelector(".byt2");
var byt = document.querySelectorAll(".byt");
var q = 1;
for (var i = 0; i < byt.length; i++) {
    byt[i].index = i;
    byt[i].onclick = function () {
        if (q == 1) {
            big.style.height = "0px";
            bif.style.height = "652px";
            big.style.overflow = "hidden";
            q = 0;
        } else {
            big.style.height = "1923px";
            bif.style.height = "0px";
            bif.style.overflow = "hidden";
            q = 1;
        }
        for (var i = 0; i < byt.length; i++) {
            byt[i].className = "byt";
        }
        byt[this.index].className = "byt fon";
    }
}
byt1.onclick = function () {
    if (q == 1) {
        byt[0].style.color = "white";
        byt[0].style.backgroundColor = "#f42424";
        byt[0].style.borderColor = "#f42424";
        byt[1].style.color = "#8c8c8c";
        byt[1].style.backgroundColor = "white";
        byt[1].style.borderColor = "#d2d2d2";
    }
    big.style.height = "1923px";
    bif.style.height = "0px";
    bif.style.overflow = "hidden";
}
byt2.onclick = function () {
    if (q == 1) {
        byt[1].style.color = "white";
        byt[1].style.backgroundColor = "#f42424";
        byt[1].style.borderColor = "#f42424";
        byt[0].style.color = "#8c8c8c";
        byt[0].style.backgroundColor = "white";
        byt[0].style.borderColor = "#d2d2d2";
    }
    big.style.height = "0px";
    bif.style.height = "652px";
    big.style.overflow = "hidden";
}





$('.side-buttom').hover(function() {
    $('#center').css({
        "visibility": "visible",
        "left": -92,
    })
},
function() {
    $('#center').css({
        "left": -121,
        "visibility": "hidden",
    })

})


$(".side-oul>li").each(function(index, ele) {
$(ele).hover(function() {
        $($(ele).children().eq(1)).css({
            "visibility": "visible",
            "left": -92,
        })
    },
    function() {
        $($(ele).children().eq(1)).css({
            "left": -121,
            "visibility": "hidden",
        })
    })
})
$(".side-oul>div").each(function(index, ele) {
    $(ele).hover(function() {
            $($(ele).eq(0).eq(1)).css({
                "visibility": "visible",
                "left": -92,
            })
        },
        function() {
            $($(ele).eq(0).eq(1)).css({
                "left": -121,
                "visibility": "hidden",
            })
        })
})
// 回顶部
$('.hdingbu').click(function() {
$('body,html').animate({
    scrollTop: 0,
})
})



var label = document.querySelector("label")
var qizhi = 0
label.onclick = function () {
    if (qizhi == 0) {
        this.style.background = "url(./images/dianpujie/checkbox_12x12.png) 0 2px no-repeat"
        qizhi = 1
    } else if (qizhi == 1) {
        this.style.background = "url(./images/dianpujie/checked_solid_12x12.png) 0 2px no-repeat"
        qizhi = 0
    }
}
$(".abc").click(function(){
    $(".pb").css({
        "display":"block"
    })
})


$(".pb-hd i").click(function(){
    $(".pb").css({
        "display":"none"
    })
})